class Store {
	constructor(options) {
		// state
		this.state = options.state
	}
	// getters  
	// mutations
	// actions
	// commit
	// dipatch
}
let install = function(_Vue) {
	_Vue.mixin({
		onBeforeCreate() { //在组件创建之前自动调用，每个组件都有这个钩子
			if (this.$options && this.$options.store) { //this.$options读取根组件
				this.$store = this.$options.store
			} else {
				this.$store = this.$parent && this.$parent.$store
			}
		}
	})
}
let Vuex = {
	Store,
	Install
}
export default Vuex
